<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后厨管理</title>
<link rel="stylesheet" href="../css/Chushi/Chushi.css">
<script type="text/javascript" src="../js/jquery-3.2.1.js"></script>
<script src="../js/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript" src="../js/Chushi/Chushi.js"></script>
</head>
<body>
	<div class="head">
		<h3>
			厨房
			</h4>
	</div>
	<input type="hidden" id="total" value="${map.total}" />
	<c:forEach items="${map.dingdan}" var="dv" varStatus="1">
		<div class="dt_list" d_id="${dv.status}">
			<div>
				<div class="dt_id">订单ID：${dv.dingdanId}</div>
				<div class="dt_table">餐桌：${dv.tableName}</div>
			</div>
			<c:set value="${dv.dingdanId}" var="x"></c:set>
			<div class="dingdan_statu">
				订单状态：
				<c:if test="${dv.status==0}">
				未制作
				</c:if>
				<c:if test="${dv.status==1}">
				制作中
				</c:if>
				<c:if test="${dv.status==2}">
				菜品已经全部完成
				</c:if>
			</div>
			<table class="table1">
				<tr>
					<th width="20%">菜品</th>
					<th width="200px">数量</th>
					<th>价格</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${dv.dingdandetails}" var="dtv" varStatus="status">
					
						<tr>
							<th style="height: 150px;">
								<div style="width: 90px; height: 90px; margin: 0 auto">
									<img alt="" src="../upload/${dtv.good.image}" style="width: 80px"
										height="80px"> <br> ${dtv.good.goodsName}
								</div>
							</th>
							<td>${dtv.num}</td>
							<td>${dtv.price}</td>
							<td class="dt_s"><c:if test="${dtv.status==0}">
								未制作
							</c:if> <c:if test="${dtv.status==1}">
									制作中
								</c:if> <c:if test="${dtv.status==2}">
									制作完成
								</c:if> <c:if test="${dtv.status==3}">
									菜品缺货
								</c:if> <c:if test="${dtv.status==4}">
									菜品被退菜
								</c:if></td>
							<th width="20%"><c:if test="${dtv.status==0}" var="x">
									<a href="javascript:void(0)" class="dt_make"
										cid="${dtv.dingdanDT_id}" title="制作"><img
										alt="制作" src="../image/chao.png" width="30px" height="30px"></a>
								</c:if> <c:if test="${not x}">
									<img alt="制作" src="../image/chao.png" width="30px" height="30px"
										title="制作">
								</c:if> <c:if test="${dtv.status==2||dtv.status==3||dtv.status==4}"
									var="y">
									<img alt="完成" src="../image/finish.png" width="30px" height="30px"
										title="完成">
								</c:if> <c:if test="${not y }">
									<a href="javascript:void(0)" class="dt_finsh"
										cid="${dtv.dingdanDT_id}" gid="${dtv.good.goodsId}"
										gstu="${dtv.status}" title="完成"><img alt="完成"
										src="../image/finish.png" width="30px" height="30px"></a>
								</c:if> <c:if test="${dtv.status==2 ||dtv.status==3||dtv.status==4}"
									var="z">
									<img alt="缺货" src="../image/que.png" width="30px" height="30px"
										title="缺货">
								</c:if> <c:if test="${not z }">
									<a href="javascript:void(0)" class="dt_que"
										cid="${dtv.dingdanDT_id}" gid="${dtv.good.goodsId}"><img
										alt="缺货" src="../image/que.png" width="30px" height="30px"
										title="缺货"></a>
								</c:if></th>
						</tr>
				</c:forEach>
			</table>
			<div class="final_price">总价格：${dv.heji}元</div>
			<div class="final_remark">备注：${dv.remark}</div>
			<div class="cancel_dt">
				<div class="btn">
					<input type="button" value="取消订单" class="cancel_btn"
						did="${dv.dingdanId}" stu="${dv.status}">
				</div>
				<div class="btn">
					<input type="button" value="完成订单" class="finsh_btn"
						did="${dv.dingdanId}">
				</div>
			</div>
		</div>
	</c:forEach>
		<jsp:include   page="pagination.jsp" flush="true"/>
</body>
</html>